package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the JOB_STATUS database table.
 * 
 */
@Entity
@Table(name="JOB_STATUS")
@NamedQuery(name="JobStatus.findAll", query="SELECT j FROM JobStatus j")
public class JobStatus implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="JOB_STATUS_JOBSID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="JOB_STATUS_JOBSID_GENERATOR")
	@Column(name="JOBS_ID")
	private long jobsId;

	@Column(name="JOBS_CREATORDATE")
	private Timestamp jobsCreatordate;

	@Column(name="JOBS_NAME")
	private String jobsName;

	@Column(name="JOBS_PERSON")
	private String jobsPerson;

	@Column(name="JOBS_UPDATEDATE")
	private Timestamp jobsUpdatedate;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="jobStatus")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	//bi-directional many-to-one association to Ygzttable
	@OneToMany(mappedBy="jobStatus")
	@JSONField(serialize=false)
	private List<Ygzttable> ygzttables;

	public JobStatus() {
	}

	public long getJobsId() {
		return this.jobsId;
	}

	public void setJobsId(long jobsId) {
		this.jobsId = jobsId;
	}

	public Timestamp getJobsCreatordate() {
		return this.jobsCreatordate;
	}

	public void setJobsCreatordate(Timestamp jobsCreatordate) {
		this.jobsCreatordate = jobsCreatordate;
	}

	public String getJobsName() {
		return this.jobsName;
	}

	public void setJobsName(String jobsName) {
		this.jobsName = jobsName;
	}

	public String getJobsPerson() {
		return this.jobsPerson;
	}

	public void setJobsPerson(String jobsPerson) {
		this.jobsPerson = jobsPerson;
	}

	public Timestamp getJobsUpdatedate() {
		return this.jobsUpdatedate;
	}

	public void setJobsUpdatedate(Timestamp jobsUpdatedate) {
		this.jobsUpdatedate = jobsUpdatedate;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setJobStatus(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setJobStatus(null);

		return staffInformation;
	}

	public List<Ygzttable> getYgzttables() {
		return this.ygzttables;
	}

	public void setYgzttables(List<Ygzttable> ygzttables) {
		this.ygzttables = ygzttables;
	}

	public Ygzttable addYgzttable(Ygzttable ygzttable) {
		getYgzttables().add(ygzttable);
		ygzttable.setJobStatus(this);

		return ygzttable;
	}

	public Ygzttable removeYgzttable(Ygzttable ygzttable) {
		getYgzttables().remove(ygzttable);
		ygzttable.setJobStatus(null);

		return ygzttable;
	}

}